package com.garlic.face.jlf.transaction.balance.cclhelper;


import android.util.Log;

import com.garlic.face.jlf.transaction.Means;
import com.garlic.face.jlf.transaction.bean.SaleFlow;
import com.garlic.face.jlf.utils.LogUtils;

public class TradeHelper {
    /// <summary>
    /// 更新商品链表中商品重量
    /// </summary>
    /// <param name="barcode"></param>
    /// <param name="flowid"></param>
    /// <param name="weight"></param>
    public static void UpdateItem(String barcode, int flowid, double weight)
    {
        LogUtils.e("ScanGoodsPresenter" + "barcode:"+ barcode + " flowid:"+ flowid + " weight:"+weight);
        for(int i = 0; i < Means.getInstance().getItemHead().size(); i++){
            SaleFlow item = Means.getInstance().getItemHead().get(i);
            if(item.getFlowid() == flowid && item.getBarcode().equals(barcode)){
                item.setWeight(weight);
            }
        }
    }
}
